package com.aizuda.encrypt.constant;

import java.util.regex.Pattern;

/**
 * 加密常量类
 *
 * @author nn200433
 * @date 2024-03-22 05:27:46
 */
public interface EncryptConstant {

    public static final String  SQL_KEY                             = "delegate.boundSql.sql";
    public static final String  MAPPED_STATEMENT_KEY                = "delegate.mappedStatement";
    public static final String  PARAMETER_MAPPINGS_KEY              = "delegate.boundSql.parameterMappings";
    public static final String  PARAMETER_OBJECT_KEY                = "delegate.boundSql.parameterObject";
    public static final String  PROPERTIES_TABLE_RULE_KEY           = "mybatis.encrypt.tables";
    public static final Pattern PROPERTIES_TABLE_RULE_PERCENT_REGEX = Pattern.compile("mybatis\\.encrypt\\.tables\\.(?<tableName>.*)\\.columns\\.(?<columnName>.*)\\.(?<entityField>.*)");
    public static final String  PROPERTIES_ENCRYPT_TYPE_KEY         = "mybatis.encrypt.encrypt-type";
    public static final String  PROPERTIES_ENCRYPT_KEY_KEY          = "mybatis.encrypt.encrypt-key";
    /** 补足位数 */
    public static final int     PAD_PRE_COUNT                       = 4;

    // public static final String  TARGET_KEY             = "h.target";
    // public static final Pattern PERCENT_REGEX          = Pattern.compile("%(?<special>.*)%");

}
